// 全局函数做友元
#include <iostream>
#include <string>
using namespace std;
class Building {
    friend void goodFriend(Building &building);
private:
    string m_bedroom;
public:
    string m_sittingRoom;
    Building() {
        this->m_bedroom = "bedRoom";
        this->m_sittingRoom = "sittingRoom";
    }
    
};
// 全局函数
void goodFriend(Building &building) {
    cout << building.m_sittingRoom << endl;
    cout << building.m_bedroom << endl;
}
void test1() {
    Building b;
    goodFriend(b);
}
int main(void) {
    test1();

    return 0;
}